package com.terrorism.first.server;

import java.util.ArrayList;
import java.util.List;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONObject;

import android.content.Context;

import com.terrorism.sdk.utils.JsonParser;

public class UserConnect {


	public static String result = "result";
	public static String userAccount = "userAccount";
	public static String userPassword = "userPassword";
	public static String userEmail = "userEmail";
	public static String userPhone = "userPhone";
	public static String userName = "userName";
	public static String userGender = "userGender";
	public static String userAge = "userAge";

	private static JsonParser jsonParser = new JsonParser();

	public static JSONObject signUp(String mUserAccount, String mUserPassword, String mUserEmail,String mUserPhone, String mUserName, String mUserGender, String mUserAge ) {
		List<NameValuePair> params = new ArrayList<NameValuePair>();
		params.add(new BasicNameValuePair(userAccount, mUserAccount));
		params.add(new BasicNameValuePair(userPassword, mUserPassword));
		params.add(new BasicNameValuePair(userEmail, mUserEmail));
		params.add(new BasicNameValuePair(userPhone, mUserPhone));
		params.add(new BasicNameValuePair(userName, mUserName));
		params.add(new BasicNameValuePair(userGender, mUserGender));
		params.add(new BasicNameValuePair(userAge, mUserAge));


		JSONObject json = jsonParser.getJSONFromUrl(API.sigupGet, params);
		return json;
	}
	//     public static JSONObject insert(Context mContext, String mNoteText) {
	//             List<NameValuePair> params = new ArrayList<NameValuePair>();
	//             params.add(new BasicNameValuePair(KEY.userAccount, UserSigned.getUserAccount(mContext)));
	//             params.add(new BasicNameValuePair(KEY.userPassword, UserSigned.getUserPassword(mContext)));
	//             params.add(new BasicNameValuePair("noteText", mNoteText));
	//             JSONObject json = jsonParser.getJSONFromUrl(API.noteInsert, params);
	//             return json;
	//     }

}
